iT邦幫忙

2023 iThome 鐵人賽

0
Software Development

深入淺出設計模式 - 使用 C++系列 第 35

《補充》 — 30+ Golden Rules in System Design

  • 分享至 

  • xImage
  •  

本文轉載自 LinkedIn 作者 Arslan Ahmad 的 guiding principles to help you answer system design questions

有時間我也會再用中文補充的更詳細

Golden Rules in System Design

1. For a Read-Heavy System

  • Consider using a Cache.

2. For a Write-Heavy System

  • Use Message Queues for async processing

3. For a Low Latency Requirement

  • Consider using a Cache and CDN.

4. Need 𝐀tomicity, 𝐂onsistency, 𝐈solation, 𝐃urability Compliant DB

  • Go for RDBMS/SQL Database.

5. Have unstructured data

  • Go for NoSQL Database

6. Have Complex Data (Videos, Images, Files)

  • Go for Blob/Object storage.

7. Complex Pre-computation

  • Use Message Queue & Cache.

8. High-Volume Data Search

  • Consider search index, tries or search engine.

9. Scaling SQL Database

  • Implement Database Sharding.

10. High Availability, Performance, & Throughput

  • Use a Load Balancer.

11. Global Data Delivery

  • Consider using a CDN.

12. Graph Data (data with nodes, edges, and relationships)

  • Utilize Graph Database.

13. Scaling Various Components

  • Implement Horizontal Scaling

14. High-Performing Database Queries

  • Use Database Indexes

15. Bulk Job Processing

  • Consider Batch Processing & Message Queues.

16. Server Load Management & Preventing DOS Attacks

  • Use a Rate Limiter.

17. Microservices Architecture

  • Use an API Gateway.

18. For Single Point of Failure

  • Implement Redundancy.

19. For Fault-Tolerance and Durability

  • Implement Data Replication.

20. For User-to-User fast communication

  • Use Websockets.

21. Failure Detection in Distributed Systems

  • Implement a Heartbeat.

22. Data Integrity

  • Use Checksum Algorithm.

23. Efficient Server Scaling

  • Implement Consistent Hashing.

24. Decentralized Data Transfer

  • Consider Gossip Protocol.

25. Location-Based Functionality

  • Use Quadtree, Geohash, etc.

26. Avoid Specific Technology Names

  • Use generic terms.

27. High Availability and Consistency Trade-Off

  • Eventual Consistency.

28. For IP resolution & Domain Name Query

  • Mention DNS.

29. Handling Large Data in Network Requests

  • Implement Pagination.

30. Cache Eviction Policy

  • Preferred is LRU (Least Recently Used) Cache.

31. To handle traffic spikes

  • Implement Autoscaling to manage resources dynamically

32. Need analytics and audit trails

  • Consider using data lakes or append-only databases

33. Handling Large-Scale Simultaneous Connections

  • Use Connection Pooling and consider using Protobuf to minimize data payload

34. To prevent overloading systems

  • Use Token Bucked and Leaky Bucket algorithms

35. Minimize deployment downtime

  • Implementing Blue-Green deployment to minimize downtime and reduce risks

上一篇
《補充》 — Design Patterns Used Across Different Layers in Distributed System
下一篇
《補充》 — 5 Classic Caching Strategies
系列文
深入淺出設計模式 - 使用 C++37
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言